<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en"><head>
    <title>Carrier (docName 0.0.1)</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="dc.created" content="2020-03-25">
    <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
    <link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style">
    <script type="text/javascript" src="../jquery/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="../jquery/jquery-migrate-3.0.1.js"></script>
    <script type="text/javascript" src="../jquery/jquery-ui.js"></script>

    <script type="text/javascript" src="../search.js"></script>
    <script async type="text/javascript" src="../module-search-index.js"></script>
    <script async type="text/javascript" src="../package-search-index.js"></script>
    <script async type="text/javascript" src="../type-search-index.js"></script>
    <script async type="text/javascript" src="../member-search-index.js"></script>
    <script async type="text/javascript" src="../tag-search-index.js"></script>
</head><body>
<script type="text/javascript"><!--
try {
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title = "adaptation (terrain-generator 0.0.1 API)";
    }
} catch (err) {
}
//-->
var pathtoroot = "../";
</script>
<noscript>
    <div>JavaScript is disabled on your browser.</div>
</noscript><header role="banner">
    <nav role="navigation">
        <div class="fixedNav">
            <!-- ========= START OF TOP NAVBAR ======= -->
            <div class="topNav"><a id="navbar.top">
                <!--   -->
            </a>
                <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a>
                </div>
                <a id="navbar.top.firstrow">
                    <!--   -->
                </a>
                <ul class="navList" title="Navigation">
    <li><a href="../index.html">Overview</a></li>
    
    <li><a href="package-summary.html">Package</a></li>
    
    <li class="navBarCell1Rev">Class</li>
    
    <li><a href="package-tree.html">Tree</a></li>
    
    <li>Deprecated</li>
    <li>Index</li>
    <li>Help</li>
</ul></div>
            <div class="subNav">
<ul class="navList" id="allclasses_navbar_top" style="display: block;">
<li><a href="../allclasses.html">All&nbsp;Classes</a></li>
</ul>

<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" class="ui-autocomplete-input" autocomplete="off" placeholder="Search">
<input type="reset" id="reset" value="reset">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div><!-- ========= END OF TOP NAVBAR ========= -->
        </div>
        <div class="navPadding">&nbsp;</div>
        <script type="text/javascript"><!--
        $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
        //-->
        </script>
    </nav>
</header>

<main role="main">
    <div class="header">
        <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html"></a></div>
        <h2 title="Class Carrier" class="title">Class Carrier</h2>
    </div>
    <div class="contentContainer">
        <!-- <ul class="inheritance">
            <li>java.lang.Object</li>
            <li>
                <ul class="inheritance">
                    <li>adaptation.Adaptation</li>
                </ul>
            </li>
        </ul> TODO inheritance tree -->
        <div class="description">
            <ul class="blockList">
                <li class="blockList">
                    
                    <hr>
                    <pre>

public final class <span class="typeNameLabel"><a href=Carrier.html>Carrier</a>&lt;T extends <a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html>Object</a>&gt;</span>

                    </pre>
                    <div class="block">一个类似于 java8 的 <a href=https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html>java.util.Optional</a> 类, 提供一些简单的api来对一个可能为null的值进行操作。其代表了一个 <span class="code">回执</span>, 而这个回执不确定其是否为 <span class="code">null</span>。</div>
                </li>
            </ul>
        </div>
        <div class="summary">
            <ul class="blockList">
                <li class="blockList">
                <!-- ======== NESTED CLASS SUMMARY ======== -->
                    
                    <section role="region">
                        <ul class="blockList">
                            <li class="blockList"><a id="nested.class.summary">
                                <!--   -->
                            </a>
                                <h3>Nested Class Summary</h3>
                                <div class="memberSummary">
                                    <table>
                                        <caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
                                        <tr>
                                            <th class="colFirst" scope="col">Modifier and Type</th>
                                            <th class="colSecond" scope="col">Class</th>
                                            <th class="colLast" scope="col">Description</th>
                                        </tr>
                                        
                                        <tr class="altColor">
                                            <td class="colFirst"><code>public class</code></td>
                                            <th class="colSecond" scope="row"><code>Companion</span></code>
                                            </th>
                                            <td class="colLast"></td>
                                        </tr>
                                        
                                    </table>
                                </div>
                            </li>
                        </ul>
                    </section>
                    
                    <!-- =========== FIELD SUMMARY =========== -->
                    
                    <!-- ======== CONSTRUCTOR SUMMARY ======== -->
                    
                    <section role="region">
                        <ul class="blockList">
                            <li class="blockList"><a id="constructor.summary">
                                <!--   -->
                            </a>
                                <h3>Constructor Summary</h3>
                                <div class="memberSummary">
                                    <table>
                                        <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
                                        <tbody>
                                        <tr>
                                            <th class="colFirst" scope="col">Constructor</th>
                                            <th class="colLast" scope="col">Description</th>
                                        </tr>

                                        
                                            <tr class="altColor">
                                                <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a
                                                        href="#Carrier(T)">Carrier</a></span>(<a href=Carrier.html>T</a> value)</code></th>
                                                <td class="colLast"></td>
                                            </tr>
                                        

                                        </tbody>
                                    </table>
                                </div>
                            </li>
                        </ul>
                    </section>
                    
                    <!-- =========== ENUM CONSTANT SUMMARY =========== -->
                    
                    <!-- ========== METHOD SUMMARY =========== -->
                    
                    <section role="region">
                        <ul class="blockList">
                            <li class="blockList"><a id="method.summary">
                                <!--   -->
                            </a>
                                <h3>Method Summary</h3>
                                <div class="memberSummary">
                                    <div role="tablist" aria-orientation="horizontal">
                                        <button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button>
                                        <!-- TODO: Instance and Concrete Methods #1118 -->
                                    </div>
                                    <div id="memberSummary_tabpanel" role="tabpanel">
                                    <table aria-labelledby="t0">
                                        <tr>
                                            <th class="colFirst" scope="col">Modifier and Type</th>
                                            <th class="colSecond" scope="col">Method</th>
                                            <th class="colLast" scope="col">Description</th>
                                        </tr>
                                        
                                        <tr id="i0" class="altColor">
                                            <td class="colFirst"><code>final <a href=https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html>Optional</a>&lt;<a href=Carrier.html>T</a>&gt;</code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#toOptional()>toOptional</a>() </code>
                                            </th>
                                            <td class="colLast">转化为java8的 <a href=https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html>java.util.Optional</a></td>
                                        </tr>
                                        
                                        <tr id="i1" class="rowColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>T</a></code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#getOrNull()>getOrNull</a>() </code>
                                            </th>
                                            <td class="colLast">得到 <a href=Carrier.html#value()>value</a> 值</td>
                                        </tr>
                                        
                                        <tr id="i2" class="altColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>T</a></code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#getOrThrow(Throwable)>getOrThrow</a>(<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html>Throwable</a> err) </code>
                                            </th>
                                            <td class="colLast">得到 <a href=Carrier.html#value()>value</a> 值，或者抛出一个异常。默认为抛出 <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-null-pointer-exception/index.html>NullPointerException</a></td>
                                        </tr>
                                        
                                        <tr id="i3" class="rowColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>T</a></code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#getOrThrow(Function0)>getOrThrow</a>(<a href=.html>Function0</a>&lt;<a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html>Throwable</a>&gt; err) </code>
                                            </th>
                                            <td class="colLast">得到 <a href=Carrier.html#value()>value</a> 值，或者通过函数获取并抛出一个异常。默认为抛出 <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-null-pointer-exception/index.html>NullPointerException</a></td>
                                        </tr>
                                        
                                        <tr id="i4" class="altColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>T</a></code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#getOrElse(T)>getOrElse</a>(<a href=Carrier.html>T</a> or) </code>
                                            </th>
                                            <td class="colLast">得到 <a href=Carrier.html#value()>value</a> 值，如果为null则获取一个默认值 <a href=.html>or</a></td>
                                        </tr>
                                        
                                        <tr id="i5" class="rowColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>T</a></code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#getOrElse(Function0)>getOrElse</a>(<a href=.html>Function0</a>&lt;<a href=Carrier.html>T</a>&gt; or) </code>
                                            </th>
                                            <td class="colLast">得到 <a href=Carrier.html#value()>value</a> 值，如果为null就通过 <a href=.html>or</a> 计算并获取一个默认值</td>
                                        </tr>
                                        
                                        <tr id="i6" class="altColor">
                                            <td class="colFirst"><code>final &lt;R extends <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>Any</a>&gt; <a href=Carrier.html>Carrier</a>&lt;<a href=Carrier.html#map(Function1)>R</a>&gt;</code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#map(Function1)>map</a>(<a href=.html>Function1</a>&lt;<a href=Carrier.html>T</a>, <a href=Carrier.html#map(Function1)>R</a>&gt; mapper) </code>
                                            </th>
                                            <td class="colLast">如果值不为null，则进行转化</td>
                                        </tr>
                                        
                                        <tr id="i7" class="rowColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>Carrier</a>&lt;<a href=Carrier.html>T</a>&gt;</code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#ifOr(Function1)>ifOr</a>(<a href=.html>Function1</a>&lt;<a href=Carrier.html>T</a>, <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html>Boolean</a>&gt; filter) </code>
                                            </th>
                                            <td class="colLast">如果值符合期望，包留，否则变为null</td>
                                        </tr>
                                        
                                        <tr id="i8" class="altColor">
                                            <td class="colFirst"><code>final <a href=Carrier.html>Carrier</a>&lt;<a href=Carrier.html>T</a>&gt;</code>
                                            </td>
                                            <th class="colSecond" scope="row"><code><a href=Carrier.html#copy(T)>copy</a>(<a href=Carrier.html>T</a> value) </code>
                                            </th>
                                            <td class="colLast"></td>
                                        </tr>
                                        
                                        </tbody>
                                    </table>
                                </div>
                                <ul class="blockList">
                                
                                    <li class="blockList"><a id="methods.inherited.from.class.love.forte.simbot.common.api.carrier.Carrier">
                                            <!--   -->
                                        </a>
                                            <h3>Methods inherited from class&nbsp;love.forte.simbot.common.api.carrier.Carrier</h3>
                                            <code>equals, hashCode, toString</code></li>
                                 
                                    <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
                                        <!--   -->
                                    </a>
                                        <h3>Methods inherited from class&nbsp;java.lang.Object</h3>
                                        <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString,
                                            wait, wait, wait</code></li>
                                </ul>
                            </li>
                        </ul>
                    </section>
                    
                </li>
            </ul>
        </div>
        <div class="details">
            <ul class="blockList">
                <li class="blockList">
                    <!-- ========= CONSTRUCTOR DETAIL ======== -->
                    
                    <section role="region">
                        <ul class="blockList">
                            <li class="blockList"><a id="constructor.detail">
                                <!--   -->
                            </a>
                                <h3>Constructor Detail</h3>
                                
                                <a name="Carrier(T)"></a>
                                <ul class="blockList">
                                    <li class="blockList">
                                        <h4>Carrier</h4>
                                        <pre>Carrier(<a href=Carrier.html>T</a> value)</pre>
                                        <div class="block"></div>
                                        
                                    </li>
                                </ul>
                                
                            </li>
                        </ul>
                    </section>
                    
                    <!-- ============ METHOD DETAIL ========== -->
                    
                    <section role="region">
                        <ul class="blockList">
                            <li class="blockList"><a id="method.detail">
                                <!--   -->
                            </a>
                                <h3>Method Detail</h3>
                                
                                <a id="toOptional()">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>toOptional</h4>
                                        <pre class="methodSignature"> final <a href=https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html>Optional</a>&lt;<a href=Carrier.html>T</a>&gt; <a href=Carrier.html#toOptional()>toOptional</a>()</pre>
                                        <div class="block">转化为java8的 <a href=https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html>java.util.Optional</a></div>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="getOrNull()">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>getOrNull</h4>
                                        <pre class="methodSignature"> final <a href=Carrier.html>T</a> <a href=Carrier.html#getOrNull()>getOrNull</a>()</pre>
                                        <div class="block">得到 <a href=Carrier.html#value()>value</a> 值</div>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="getOrThrow(Throwable)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>getOrThrow</h4>
                                        <pre class="methodSignature">@<a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/index.html>JvmOverloads</a>() final <a href=Carrier.html>T</a> <a href=Carrier.html#getOrThrow(Throwable)>getOrThrow</a>(<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/Throwable.html>Throwable</a> err)</pre>
                                        <div class="block">得到 <a href=Carrier.html#value()>value</a> 值，或者抛出一个异常。默认为抛出 <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-null-pointer-exception/index.html>NullPointerException</a></div>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="getOrThrow(Function0)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>getOrThrow</h4>
                                        <pre class="methodSignature"> final <a href=Carrier.html>T</a> <a href=Carrier.html#getOrThrow(Function0)>getOrThrow</a>(<a href=.html>Function0</a>&lt;<a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html>Throwable</a>&gt; err)</pre>
                                        <div class="block">得到 <a href=Carrier.html#value()>value</a> 值，或者通过函数获取并抛出一个异常。默认为抛出 <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-null-pointer-exception/index.html>NullPointerException</a></div>
                                        
                                        <dl>
                                            <dt><span class="paramLabel">Parameters:</span></dt>
                                            
                                            
                                            <dd><code>err</code> - in java: <span class="code">getOrThrow(() -> new RuntimeException()) </span></dd>
                                            
                                            
                                        </dl>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="getOrElse(T)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>getOrElse</h4>
                                        <pre class="methodSignature"> final <a href=Carrier.html>T</a> <a href=Carrier.html#getOrElse(T)>getOrElse</a>(<a href=Carrier.html>T</a> or)</pre>
                                        <div class="block">得到 <a href=Carrier.html#value()>value</a> 值，如果为null则获取一个默认值 <a href=.html>or</a></div>
                                        
                                        <dl>
                                            <dt><span class="paramLabel">Parameters:</span></dt>
                                            
                                            
                                            <dd><code>or</code> - T</dd>
                                            
                                            
                                        </dl>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="getOrElse(Function0)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>getOrElse</h4>
                                        <pre class="methodSignature"> final <a href=Carrier.html>T</a> <a href=Carrier.html#getOrElse(Function0)>getOrElse</a>(<a href=.html>Function0</a>&lt;<a href=Carrier.html>T</a>&gt; or)</pre>
                                        <div class="block">得到 <a href=Carrier.html#value()>value</a> 值，如果为null就通过 <a href=.html>or</a> 计算并获取一个默认值</div>
                                        
                                        <dl>
                                            <dt><span class="paramLabel">Parameters:</span></dt>
                                            
                                            
                                            <dd><code>or</code> - Function0&lt;T&gt;</dd>
                                            
                                            
                                        </dl>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="map(Function1)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>map</h4>
                                        <pre class="methodSignature"> final &lt;R extends <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>Any</a>&gt; <a href=Carrier.html>Carrier</a>&lt;<a href=Carrier.html#map(Function1)>R</a>&gt; <a href=Carrier.html#map(Function1)>map</a>(<a href=.html>Function1</a>&lt;<a href=Carrier.html>T</a>, <a href=Carrier.html#map(Function1)>R</a>&gt; mapper)</pre>
                                        <div class="block">如果值不为null，则进行转化</div>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="ifOr(Function1)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockList"
                                          >
                                    <li class="blockList">
                                        <h4>ifOr</h4>
                                        <pre class="methodSignature"> final <a href=Carrier.html>Carrier</a>&lt;<a href=Carrier.html>T</a>&gt; <a href=Carrier.html#ifOr(Function1)>ifOr</a>(<a href=.html>Function1</a>&lt;<a href=Carrier.html>T</a>, <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html>Boolean</a>&gt; filter)</pre>
                                        <div class="block">如果值符合期望，包留，否则变为null</div>
                                        
                                        <dl>
                                            <dt><span class="paramLabel">Parameters:</span></dt>
                                            
                                            
                                            <dd><code>filter</code> - Function1&lt;T, Boolean&gt;</dd>
                                            
                                            
                                        </dl>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                                <a id="copy(T)">
                                    <!--   -->
                                </a>
                                <ul class=
                                              "blockListLast"
                                          >
                                    <li class="blockList">
                                        <h4>copy</h4>
                                        <pre class="methodSignature"> final <a href=Carrier.html>Carrier</a>&lt;<a href=Carrier.html>T</a>&gt; <a href=Carrier.html#copy(T)>copy</a>(<a href=Carrier.html>T</a> value)</pre>
                                        <div class="block"></div>
                                        
                                        <!-- TODO missing return annotation -->
                                    </li>
                                </ul>
                                
                            </li>
                        </ul>
                    </section>
                    
                </li>
            </ul>
        </div>
    </div>
</main>
<footer role="contentinfo">
    <nav role="navigation">
        <!-- ======= START OF BOTTOM NAVBAR ====== -->
        <div class="bottomNav"><a id="navbar.bottom">
            <!--   -->
        </a>
            <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a>
            </div>
            <a id="navbar.bottom.firstrow">
                <!--   -->
            </a>
            <ul class="navList" title="Navigation">
    <li><a href="../index.html">Overview</a></li>
    
    <li><a href="package-summary.html">Package</a></li>
    
    <li class="navBarCell1Rev">Class</li>
    
    <li><a href="package-tree.html">Tree</a></li>
    
    <li>Deprecated</li>
    <li>Index</li>
    <li>Help</li>
</ul></div>
        <a id="skip.navbar.bottom">
            <!--   -->
        </a></div>
        <div class="subNav">
<ul class="navList" id="allclasses_navbar_top" style="display: block;">
<li><a href="../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div><!-- ======== END OF BOTTOM NAVBAR ======= -->
    </nav>
</footer><ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content" id="ui-id-1" tabindex="0"
    style="display: none;"></ul>
<span role="status" aria-live="assertive" aria-relevant="additions" class="ui-helper-hidden-accessible"></span>
</body>
</html>
